package com.sunyard.manage.service;


import com.sunyard.dal.bo.*;
import com.sunyard.dal.bo.device.lock.LogBO;
import com.sunyard.dal.bo.log.OperateHistoryBO;
import com.sunyard.dal.bo.log.SysLogBO;
import com.sunyard.dal.bo.warning.NotWorkingTimeBO;
import com.sunyard.dal.dto.NotWorkingTimeDTO;
import com.sunyard.dal.dto.OperateHistoryDTO;
import com.sunyard.dal.dto.SysLogQueryDTO;
import com.sunyard.dal.entity.SysLog;
import com.sunyard.utils.Response.BaseResult;
import com.sunyard.utils.manage.DataGrid;

import javax.servlet.http.HttpServletRequest;

/**
 * @author k3887
 * @Description
 * @date 2018-11-22 下午4:07:19
 */
public interface OperatorLogService {

    /**
     * @Description: 添加日志
     * @Author: huix.Liang
     * @Date: 2019-07-30 15:03
     */
    Integer aspectInsert(SysLog operateLog);

    /**
     * @param operationDesc 日志信息描述
     * @param logName       操作名称 如：登录 登出 添加用户 添加机构等
     * @param logStatus     操作状态
     * @param opId          用户ID
     * @param opName        用户名
     * @return int
     */
    Integer insert(String operationDesc, String logName, String logStatus, String opId, String opName, String orgId);

    /***
     * 分页查询日志
     */
    BaseResult<DataGrid<SysLogQueryDTO>> querySysLog(PaginationBO<SysLogBO> operatorLogBO, HttpServletRequest request) throws Exception;

    /**
     * @description 分页查询历史日志
     * @author tsz
     * @date 2022/12/16
     * @param historyBOPaginationBO
     * @param request
     * @return BaseResult<DataGrid<OperateHistoryDTO>>
     * @throws
    */
    BaseResult<DataGrid<OperateHistoryDTO>> queryHistory(PaginationBO<OperateHistoryBO> historyBOPaginationBO, HttpServletRequest request) throws Exception;

    /**
     * @description 获取非工作时间日志
     * @author tsz
     * @date 2022/12/16
     * @param notWorkingTimeBOPaginationBO
     * @param request
     * @return BaseResult<DataGrid<NotWorkingTimeDTO>>
     * @throws
    */
    BaseResult<DataGrid<NotWorkingTimeDTO>> getNotWorkingTimeLog(PaginationBO<NotWorkingTimeBO> notWorkingTimeBOPaginationBO, HttpServletRequest request);

    /**
     * 上传系统日志
     * @author wp
     * @date 2022/10/8
     * @param bo
     * @return com.sunyard.utils.Response.BaseResult
     * @throws
    */
    BaseResult uploadSysLog(LogBO bo);
}
